﻿package org.neelts.web.vkontakte {
	
	import flash.display.DisplayObject;
	
	import flash.display.LoaderInfo;
	
	/**
	* ...
	* @author Neelts © 2008
	*/
	public class API {
		
		public static const URL:String = "http://api.vkontakte.ru/api.php";
		public static const REQUEST_METHOD:String = "POST";
		
		public static const GET_SERVER_TIME:String = "getServerTime";
		public static const GET_MESSAGES:String = "getMessages";
		public static const SEND_MESSAGE:String = "sendMessage";
		public static const GET_VARIABLE:String = "getVariable";
		public static const GET_VARIABLES:String = "getVariables";
		public static const PUT_VARIABLE:String = "putVariable";
		public static const GET_USER_INFO:String = "getUserInfo";
		public static const GET_USER_INFO_EX:String = "getUserInfoEx";
		public static const GET_HIGH_SCORES:String = "getHighScores";
		public static const SET_USER_SCORE:String = "setUserScore";
		
		public static const V_SESSION_NAME:Number = 2049;
		
		public function API() {
			
		}
		
		/**
		 * 
		 * Reads vkontakte vars from root
		 * 
		 * @param	root
		 * @return
		 */
		
		public static function readVars(root:DisplayObject):Object {
			return LoaderInfo(root.loaderInfo).parameters;
		}
		
		
	}
	
}